%sumCartas = suma de las cartas del jugador
%pedir = True si pedir otra carta, o False si no pedir otra carta, es
%decir, plantarse
%As = True si llevo as, False si no llevo as
%Dobles = true si llevo dobles
function accion = getAction(sumCartas, As, cartaCrupier, Dobles)

if (Dobles)
    if sumCartas == 2 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 7)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 8)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 9)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 10)
        accion = 'dividir'; return;
    elseif sumCartas == 2 && (cartaCrupier == 11)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 7)
        accion = 'dividir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 8)
        accion = 'pedir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 9)
        accion = 'pedir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 10)
        accion = 'pedir'; return;
    elseif sumCartas == 4 && (cartaCrupier == 11)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 2)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 3)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 4)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 7)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 8)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 9)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 10)
        accion = 'pedir'; return;
    elseif sumCartas == 6 && (cartaCrupier == 11)
        accion = 'pedir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 7)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 8)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 9)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 10)
        accion = 'dividir'; return;
    elseif sumCartas == 8 && (cartaCrupier == 11)
        accion = 'plantarse'; return;
    elseif sumCartas == 10 && (cartaCrupier == 2)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 3)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 4)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 5)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 6)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 7)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 8)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 9)
        accion = 'doblar'; return;
    elseif sumCartas == 10 && (cartaCrupier == 10)
        accion = 'pedir'; return;
    elseif sumCartas == 10 && (cartaCrupier == 11)
        accion = 'pedir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 7)
        accion = 'pedir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 8)
        accion = 'pedir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 9)
        accion = 'pedir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 10)
        accion = 'pedir'; return;
    elseif sumCartas == 12 && (cartaCrupier == 11)
        accion = 'pedir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 7)
        accion = 'dividir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 8)
        accion = 'pedir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 9)
        accion = 'pedir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 10)
        accion = 'pedir'; return;
    elseif sumCartas == 14 && (cartaCrupier == 11)
        accion = 'pedir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 7)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 8)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 9)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 10)
        accion = 'dividir'; return;
    elseif sumCartas == 16 && (cartaCrupier == 11)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 2)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 3)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 4)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 5)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 6)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 7)
        accion = 'plantarse'; return;
    elseif sumCartas == 18 && (cartaCrupier == 8)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 9)
        accion = 'dividir'; return;
    elseif sumCartas == 18 && (cartaCrupier == 10)
        accion = 'plantarse'; return;
    elseif sumCartas == 18 && (cartaCrupier == 11)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 2)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 3)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 4)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 5)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 6)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 7)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 8)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 9)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 10)
        accion = 'plantarse'; return;
    elseif sumCartas == 20 && (cartaCrupier == 11)
        accion = 'plantarse'; return;
    else
        %NADA
    end
end

    %Reglas
    if (sumCartas == 4) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 5)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 6)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 4) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 5)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 6)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 5) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 5)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 6)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 6) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 5)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 6)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 7) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 5)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 6)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 8) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 3)
        accion = 'doblar'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 9) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 7)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 8)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 9)
        accion = 'doblar'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 10) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 2)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 3)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 7)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 8)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 9)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 10)
        accion = 'doblar'; return;

    elseif (sumCartas == 11) && (As == false) && (cartaCrupier == 11)
        accion = 'doblar'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 12) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == false) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 17) && (As == false) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == false) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == false) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == false) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == false) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 13) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 4)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 14) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 15) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 3)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 16) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 2)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 3)
        accion = 'doblar'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 7)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 8)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 17) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 2)
        accion = 'doblar'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 3)
        accion = 'doblar'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 4)
        accion = 'doblar'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 5)
        accion = 'doblar'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 9)
        accion = 'pedir'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 10)
        accion = 'pedir'; return;

    elseif (sumCartas == 18) && (As == true) && (cartaCrupier == 11)
        accion = 'pedir'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 6)
        accion = 'doblar'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 19) && (As == true) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 20) && (As == true) && (cartaCrupier == 11)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 2)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 3)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 4)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 5)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 6)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 7)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 8)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 9)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 10)
        accion = 'plantarse'; return;

    elseif (sumCartas == 21) && (As == true) && (cartaCrupier == 11)
        accion = 'plantarse'; return;
    else
        accion = 'plantarse'; return;
    end
end